/**
 * Created by liguangsong on 16/8/13.
 */
import React from 'react'
import '../../css/container/content_text.css'

var ContentText = React.createClass({

    getImageView() {
        if (this.props.image === "") {
            return null;
        }
        else {
            return (
                <img style={{width: '100%'}} className="content_image" src={this.props.image} />
            )
        }
    },

    render() {
        return (
            <div className="content_text">
                <h1>{this.props.title}</h1>
                <p><a>{this.props.type}</a> / {this.props.time}</p>
                {this.getImageView()}
                <p className="content_title">{this.props.text}....</p>
                <div><a href="www">阅读全文</a></div>
            </div>
        )
    }
});

export default ContentText;